package com.liunian.subject.infra.basic.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liunian.subject.infra.basic.entity.SubjectCategory;
import com.liunian.subject.infra.basic.service.SubjectCategoryService;
import com.liunian.subject.infra.basic.mapper.SubjectCategoryMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
*
*/
@Service
@Slf4j
public class SubjectCategoryServiceImpl extends ServiceImpl<SubjectCategoryMapper, SubjectCategory> implements SubjectCategoryService{

    @Resource
    private SubjectCategoryMapper subjectCategoryMapper;

    @Override
    public List<SubjectCategory> queryCategory(SubjectCategory subjectCategory) {
        return subjectCategoryMapper.queryCategory(subjectCategory);
    }

    @Override
    public int updateCategory(SubjectCategory subjectCategory) {
        return subjectCategoryMapper.updateCategory(subjectCategory);
    }

    @Override
    public Boolean saveSubjectCategory(SubjectCategory subjectCategory) {
        return this.save(subjectCategory);
    }
}
